import * as React from 'react';
import { useInjectable, ViewState } from '@opensumi/ide-core-browser';
import { Button } from '@opensumi/ide-components';
import * as styles from './lowcode.module.less';
import { ILowcodeService } from '../common';


export default function LowcodeView({
    viewState,
}: React.PropsWithChildren<{ viewState: ViewState }>) {

    const { showMessage, openPage } = useInjectable<ILowcodeService>(ILowcodeService);

    return (
        <div className={styles.lowcodeView}>
            <div style={{ padding: '10px' }}>
            点击按钮创建项目或者创建页面
            <Button className={styles.button} type='primary' icon='share' onClick={() => showMessage('创建项目')}>创建项目</Button>
            <Button className={styles.button} type='primary' icon='share' onClick={() => openPage('创建页面')}>创建页面</Button>
            <Button className={styles.button} type='primary' icon='share' onClick={() => openPage('创建页面2')}>创建页面2</Button>
            </div>
        </div>
    );
}
